<template>
  <div>
   <template>
  <el-table
    :data="contract"
    border
    style="width: 100%">
    <el-table-column
      fixed
      prop="contract_number"
      label="合同编号"
      width="150">
    </el-table-column>
    <el-table-column
      prop="borrow_id"
      label="借款需求"
      width="120">
    </el-table-column>
    <el-table-column
      prop="enterprise_id"
      label="企业信息"
      width="120">
    </el-table-column>
    <el-table-column
      prop="contract_name"
      label="合同名称"
      width="120">
    </el-table-column>
    <el-table-column
      prop="remit_id"
      label="银行卡账户"
      width="300">
    </el-table-column>
    
    <el-table-column
      fixed="right"
      label="操作"
      width="100">
      <template slot-scope="scope">
        <el-button @click="handleClick(scope.row)" type="text" size="small">查看</el-button>
        <el-button type="text" size="small">编辑</el-button>
      </template>
    </el-table-column>
  </el-table>
</template>
  </div>
</template>

<script>
export default {
  methods: {
      handleClick(row) {
        console.log(row);
      }
    },
   created(){
     this.$axios
        .get("http://localhost:8800/contract/allContract", this.contract)
        .then((resp) => {
          console.log(resp.data);
          this.contract=resp.data
        });   
    },
    data() {
      return {
        contract: [{
          contract_number: '',
          borrow_id: '',
          contract_name: '',
          enterprise_id: '',
          remit_id: '',
        }]
      }
    },
    
}
</script>

<style>
</style>